#	Example:
# 
#	example_trigger = {
#		tag = GER
#		is_ai = no
#	}
#
#
#	In a script file:
#
#	trigger = {
#		exampel_trigger = yes
#	}
# 

TUR_is_historical_ai = {
	OR = {
		AND = {
			is_historical_focus_on = yes
			has_game_rule = {
				rule = TUR_ai_behavior
				option = DEFAULT
			}	
		}
		has_country_flag = TUR_AI_RANDOM_NEUTRALITY_HISTORICAL
		has_game_rule = {
			rule = TUR_ai_behavior
			option = HISTORICAL
		}
	}
}

TUR_cannot_form_kurdish_collaboration_government = {
	custom_trigger_tooltip = {
		tooltip = TUR_cannot_form_kurdish_collaboration_government_tt
		AND = {
			FROM = { original_tag = KUR }
			original_tag = TUR
		}
	}
}

TUR_has_a_prime_minister = {
	custom_trigger_tooltip = {
		tooltip = TUR_has_a_prime_minister_tt
		OR = { 
			has_idea = TUR_fevzi_cakmak_prime_minister
			has_idea = TUR_sukru_saracoglu_prime_minister
			has_idea = TUR_celal_bayar
			has_idea = TUR_fethi_okyar
			has_idea = TUR_sevket_sureyya_aydemir
			has_idea = TUR_recep_peker
			has_idea = TUR_adnan_menderes
			has_idea = TUR_nuri_demirag_prime_minister
			has_idea = TUR_sefik_husnu
			has_idea = TUR_said_i_nursi
			has_idea = TUR_nihal_atsiz
		}
	}
}


TUR_can_only_have_one_prime_minister = {
	custom_trigger_tooltip = {
		tooltip = TUR_can_only_have_one_prime_minister_tt
		if = {
			limit = {
				has_idea = TUR_ismet_inonu
			}
			NOT = {
				OR = { 
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_fevzi_cakmak_prime_minister
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_sukru_saracoglu_prime_minister
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_celal_bayar
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_fethi_okyar
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_sevket_sureyya_aydemir
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_recep_peker
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_adnan_menderes
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_nuri_demirag_prime_minister
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_sefik_husnu
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_said_i_nursi
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_said_i_nursi
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_nihal_atsiz
				}
			}
		}
		if = {
			limit = {
				has_idea = TUR_nihal_atsiz
			}
			NOT = {
				OR = { 
					has_idea = TUR_ismet_inonu
					has_idea = TUR_fevzi_cakmak_prime_minister
					has_idea = TUR_sukru_saracoglu_prime_minister
					has_idea = TUR_celal_bayar
					has_idea = TUR_fethi_okyar
					has_idea = TUR_sevket_sureyya_aydemir
					has_idea = TUR_recep_peker
					has_idea = TUR_adnan_menderes
					has_idea = TUR_nuri_demirag_prime_minister
					has_idea = TUR_sefik_husnu
					has_idea = TUR_said_i_nursi
				}
			}
		}
	}
}

TUR_has_turkish_state_modifier = {
	custom_trigger_tooltip = {
		tooltip = TUR_has_turkish_state_modifier_tt
		all_state = {
			if = {
				limit = {
					NOT = { is_owned_by = TUR }
					OR = {
						has_dynamic_modifier = { modifier = kurdish_agitation }
						has_dynamic_modifier = { modifier = kurdish_separatism }
						has_dynamic_modifier = { modifier = kurdish_rebellion }
						has_dynamic_modifier = { modifier = separatist_fatigue }
						has_dynamic_modifier = { modifier = islamist_opposition }
						has_dynamic_modifier = { modifier = islamist_sedition }
						has_dynamic_modifier = { modifier = islamist_insurgency }
						has_dynamic_modifier = { modifier = islamists_placated }
						has_dynamic_modifier = { modifier = kemalist_loyalties }
						has_dynamic_modifier = { modifier = kemalist_schemers }
						has_dynamic_modifier = { modifier = turanist_assimilation }
						has_dynamic_modifier = { modifier = conscription_exemptions_granted }
					}
				}
			}
		}
	}
}

TUR_has_former_turkish_state_modifier = {
	custom_trigger_tooltip = {
		tooltip = TUR_has_former_turkish_state_modifier_tt
		all_state = {
			if = {
				limit = {
					AND = {
						is_owned_by = TUR
						OR = {
							has_state_flag = TUR_kurdish_state_conquered
							has_state_flag = TUR_traditionalist_state_conquered
							has_state_flag = TUR_loyal_kemalist_state_conquered
							has_state_flag = TUR_turanist_state_conquered
						}
					}
				}
			}
		}
	}
}

TUR_a_monopoly_has_been_formed = {
	custom_trigger_tooltip = {
		tooltip = TUR_a_monopoly_has_been_formed_tt
		AND = {
			has_idea = koc_ticaret_as_armor
			has_idea = koc_ticaret_as_shipyard
			has_idea = koc_ticaret_as_defense_industry
		}
	}
}

TUR_debt_council_has_no_sway = {
	custom_trigger_tooltip = {
		tooltip = TUR_debt_council_has_no_sway_tt
		NOT = {
			OR = {
				has_idea = TUR_debt_council
				has_idea = TUR_tpda
			}
		}
	}
}

TUR_is_fundamentalist_state = {
	custom_trigger_tooltip = {
		tooltip = TUR_is_fundamentalist_state_tt
		OR = {
			AND = {
				state = 49
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 347
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 343
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 346
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 342
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 798
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 356
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 348
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 344
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 349
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 355
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
			AND = {
				state = 345
				OR = {
					has_dynamic_modifier = { modifier = islamist_opposition }
					has_dynamic_modifier = { modifier = islamist_sedition }
					has_dynamic_modifier = { modifier = islamist_insurgency }
				}
			}
		}
	}
}

TUR_is_kemalist_state = {
	custom_trigger_tooltip = {
		tooltip = TUR_is_kemalist_state_tt
		OR = {
			AND = {
				state = 49
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 347
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 343
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 354
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 346
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 342
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 341
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 797
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 339
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
			AND = {
				state = 340
				OR = {
					has_dynamic_modifier = { modifier = kemalist_loyalties }
					has_dynamic_modifier = { modifier = kemalist_schemers }
				}
			}
		}
	}
}

TUR_is_unaligned_state = {
	custom_trigger_tooltip = {
		tooltip = TUR_is_unaligned_state_tt
		OR = {
			AND = {
				state = 49
				has_state_flag = TUR_ideological_battleground_state
			}
			AND = {
				state = 347
				has_state_flag = TUR_ideological_battleground_state
			}
			AND = {
				state = 343
				has_state_flag = TUR_ideological_battleground_state
			}
			AND = {
				state = 346
				has_state_flag = TUR_ideological_battleground_state
			}
			AND = {
				state = 342
				has_state_flag = TUR_ideological_battleground_state
			}
		}
	}
}

TUR_is_hostile_kurdish_state = {
	custom_trigger_tooltip = {
		tooltip = TUR_is_hostile_kurdish_state_tt
		OR = {
			AND = {
				state = 350
				OR = {
					has_dynamic_modifier = { modifier = kurdish_agitation }
					has_dynamic_modifier = { modifier = kurdish_separatism }
					has_dynamic_modifier = { modifier = kurdish_rebellion }
				}
			}
			AND = {
				state = 353
				OR = {
					has_dynamic_modifier = { modifier = kurdish_agitation }
					has_dynamic_modifier = { modifier = kurdish_separatism }
					has_dynamic_modifier = { modifier = kurdish_rebellion }
				}
			}
			AND = {
				state = 800
				OR = {
					has_dynamic_modifier = { modifier = kurdish_agitation }
					has_dynamic_modifier = { modifier = kurdish_separatism }
					has_dynamic_modifier = { modifier = kurdish_rebellion }
				}
			}
			AND = {
				state = 352
				OR = {
					has_dynamic_modifier = { modifier = kurdish_agitation }
					has_dynamic_modifier = { modifier = kurdish_separatism }
					has_dynamic_modifier = { modifier = kurdish_rebellion }
				}
			}
		}
	}
}

TUR_is_friendly_kurdish_state = {
	custom_trigger_tooltip = {
		tooltip = TUR_is_friendly_kurdish_state_tt
		OR = {
			AND = {
				state = 350
				compliance > 70
				resistance < 30
			}
			AND = {
				state = 353
				compliance > 70
				resistance < 30
			}
			AND = {
				state = 800
				compliance > 70
				resistance < 30
			}
			AND = {
				state = 352
				compliance > 70
				resistance < 30
			}
		}
	}
}

TUR_has_kemalist_officers = {
	custom_trigger_tooltip = {
		tooltip = TUR_has_kemalist_officers_tt
		OR = {
			has_idea = TUR_kemalist_army_officers_minimal_power_loyal
			has_idea = TUR_kemalist_army_officers_minimal_power_neutral
			has_idea = TUR_kemalist_army_officers_minimal_power_disloyal
			has_idea = TUR_kemalist_army_officers_decreased_power_loyal
			has_idea = TUR_kemalist_army_officers_decreased_power_neutral
			has_idea = TUR_kemalist_army_officers_decreased_power_disloyal
			has_idea = TUR_kemalist_army_officers_limited_power_loyal
			has_idea = TUR_kemalist_army_officers_limited_power_neutral
			has_idea = TUR_kemalist_army_officers_limited_power_disloyal
			has_idea = TUR_kemalist_army_officers_extended_power_loyal
			has_idea = TUR_kemalist_army_officers_extended_power_neutral
			has_idea = TUR_kemalist_army_officers_extended_power_disloyal
			has_idea = TUR_kemalist_army_officers_powerful_loyal
			has_idea = TUR_kemalist_army_officers_powerful_neutral
			has_idea = TUR_kemalist_army_officers_powerful_disloyal
		}
	}
}

TUR_is_friend_for_bosphorus = { #Scripted Trigger for handling the Bosphorus access before the Montreux Convention and after depending on the results of the event chain. 
	hidden_trigger = {
		OR = { 
			AND = { #Before Montreux Convention, everyone treated as "Friend" as long as Turkey is not at war with them and they control the Bosphorus 
				TUR = { 
					NOT = { has_completed_focus = TUR_the_montreux_convention }  
					controls_state = 797
					NOT = { has_country_flag = TUR_strait_compromise_set }
				}
				NOT = { has_war_with = TUR }  	
			}
			AND = { #Bosphorus Compromise. As long as Turkey controls the Bosphorus and they're not at war with them, any country that owns a state bordering the Black Sea is treated as a "Friend"
				TUR = {
					controls_state = 797
					has_country_flag = TUR_strait_compromise_set
				}
				NOT = { has_war_with = TUR }  	
				TUR_owns_state_in_black_sea = yes
			}
			797 = { #This so countries allied to the controller of the Bosphorus can cross it. 
				controller = {
					OR = {
						is_in_faction_with = ROOT 
						ROOT = { has_military_access_to = PREV }
					}
				}
			}
			ROOT = { #So the controller can cross their own strait
				controls_state = 797
			}
		}
	}	
}

TUR_is_friend_for_dardanelles = { #Scripted Trigger for handling the Dardanelles access before the Montreux Convention and after depending on the results of the event chain. 
	hidden_trigger = {
		OR = { 
			AND = { #Before Montreux Convention, everyone treated as "Friend" as long as Turkey is not at war with them and they control The Dardanelles provinces
				TUR = { 
					NOT = { has_completed_focus = TUR_the_montreux_convention }  
					controls_province = 6864
					controls_province = 849				
					NOT = { has_country_flag = TUR_strait_compromise_set }
				}
				NOT = { has_war_with = TUR }  	
			}
			AND = { #Bosphorus Compromise. As long as Turkey controls the Dardanelles and they're not at war with them, any country that owns a state bordering the Black Sea is treated as a "Friend"
				TUR = {
					controls_province = 6864
					controls_province = 849
					has_country_flag = TUR_strait_compromise_set
				}
				NOT = { has_war_with = TUR }  	
				TUR_owns_state_in_black_sea = yes 
			}
			797 = { #This so countries allied to the controller of the Dardanelles can cross them. 
				controller = { 
					OR = {
						is_in_faction_with = ROOT 
						ROOT = { has_military_access_to = PREV }
					}
				}
			}
			ROOT = { #So the controller can cross their own strait 
				AND = {
					controls_province = 6864
					controls_province = 849
				}
			}
		}
	}	
}

TUR_owns_state_in_black_sea = {
	OR = {
		owns_state = 341
		owns_state = 211
		owns_state = 77
		owns_state = 46
		owns_state = 766
		owns_state = 192
		owns_state = 197
		owns_state = 196
		owns_state = 200
		owns_state = 137
		owns_state = 227
		owns_state = 218
		owns_state = 234
		owns_state = 233
		owns_state = 826
		owns_state = 231
		owns_state = 354
		owns_state = 355
		owns_state = 356
		owns_state = 347
	}
}